﻿@{
    ViewBag.Title = "主页";
    
}
@model List<SQLCE.Entity.Product>
<h2>@ViewBag.Message</h2>
<h3>
    @Html.ActionLink("中文", "Index", new { culture = "zh-CN" })
    @Html.ActionLink("英文", "English", new { culture = "en" })</h3>
<p>
    若要了解有关 ASP.NET MVC 的更多信息，请访问 <a href="http://asp.net/mvc" title="ASP.NET MVC 网站">http://asp.net/mvc</a>。
</p>
@if (Model != null)
{
    <table border="1" width="100%">
        <tr>
            <td>
            </td>
            <td>
                商品
            </td>
            <td>
                所有者
            </td>
            <td>
                价格
            </td>
        </tr>
        @foreach (var i in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink("编辑", "Edit", new { id = @i.ID })
                    @Html.ActionLink("删除", "Delete", new { id = @i.ID })
                </td>
                <td>
                    @i.Name
                </td>
                <td>
                    @i.User_Info.Name
                </td>
                <td>
                    @i.Price
                </td>
            </tr>
        }
    </table>
}
 
